<a href="{{route('users.show',$user->id)}}">
    <img src="{{$user->getAvatar()}}" alt="{{$user->name}}" width="150" class="img-thumbnail">
</a>
<h4 class="pb-3">{{$user->name}}</h4>

@can('fans',$user)
    <section class="mb-3">
        @if(\Illuminate\Support\Facades\Auth::user()->isFaning($user))
            <form action="{{route('user.unfan',$user->id)}}" method="post">
                @csrf
                @method('delete')
                <button class="btn btn-sm btn-dark">取消关注</button>
            </form>
        @else
            <form action="{{route('user.fan',$user->id)}}" method="post">
                @csrf
                <button class="btn btn-sm btn-primary">关注</button>
            </form>
        @endif
    </section>
@endcan


